<include file="public/min-header"/>
<div class="wrapper">
	<include file="public/breadcrumb"/>
	<style>#search-form > .form-group{margin-left: 10px;}</style>
	<!-- Main content -->
	<section class="content">
		<div class="container-fluid">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title"><i class="fa fa-list"></i> 课程订单列表</h3>
				</div>
				<div class="panel-body">
					<div class="navbar navbar-default">

						<form action="javascript:;" id="search-form" class="navbar-form form-inline" method="post" onsubmit="return false">
							<div class="form-group">
								<input type="text" name="keywords" class="form-control" placeholder="搜索：课程名称">
							</div>

							<div class="form-group">
								<select name="shopId" class="form-control">
									<option value="">所属店铺：全部</option>
									<volist name="shopList" id="shopList">
										<option value="{$shopList.shopId}">{$shopList.shopName}</option>
									</volist>

								</select>
							</div>

							<div class="form-group">
								<select name="coachId" class="form-control">
									<option value="">所属教练：全部</option>
									<volist name="coachList" id="coachList">
										<option value="{$coachList.coachId}">{$coachList.coachName}</option>
									</volist>

								</select>
							</div>

							<div class="form-group">
								<select name="orderStatus" class="form-control">
									<option value="">订单状态：全部</option>

									<volist name="orderCourseStatus" id="orderCourseStatus" key="key">
										<option value="{$key-1}">{$orderCourseStatus}</option>
									</volist>


								</select>
							</div>

							<button type="submit" onclick="ajax_get_table('search-form', 1)" id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选</button>
<!--							<button type="button" onclick="layerAlert('添加等级', '{:U('user/gradeAdd')}', '70%', '85%')" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加等级</button>-->
						</form>
					</div>
					<div id="ajax_return"> </div>
				</div>
			</div>
		</div>
		<!-- /.row -->
	</section>
	<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script>
	$(document).ready(function(){
		// ajax 加载商品列表
		ajax_get_table('search-form', 1);

	});
	cur_page = 1;
	// ajax 抓取页面 form 为表单id  page 为当前第几页
	function ajax_get_table(form, page){
		cur_page = page; //当前页面 保存为全局变量
		$.ajax({
			type : "POST",
			url:"/index.php?m=mingteng&c=order&a=ajax_course&page="+page,//+tab,
			data : $('#'+form).serialize(),// 你的formid
			success: function(data){
				$("#ajax_return").html('');
				$("#ajax_return").append(data);
			}
		});
	}

</script>
</body>
</html>